package com.ymatou.iapi.csim.service;

import com.ymatou.iapi.csim.parameter.DiscourseResp;
import com.ymt.base.YmatouBaseCall;
import com.ymt.core.tool.FormatUtil;
import com.ymttest.utils.DataUtil;
import com.ymttest.utils.EnvSetup;
/**
*获取所有个人话术分类列表Call
*FreeMaker Template自动生成代码
*/
public class FetchAllIndividualDiscourseCategoryCall extends YmatouBaseCall{
	private static String opurl ="api/IndividualDiscourse/FetchAllIndividualDiscourseCategory";
	
	public FetchAllIndividualDiscourseCategoryCall() {
		super(EnvSetup.getSystemUrl("csim_iapi"),opurl,"GET","PARAM");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		//client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	
	
	 public String getStatus()
	 {
	        return getString("Status");
	 }
	 public String getMsg()
	 {
	        return getString("Msg");
	 }
	 
	 
	 
		public DiscourseResp getData()
	    {
			DiscourseResp data = null;
	        try {
	         data = (DiscourseResp) FormatUtil.GSONToObject(DataUtil.Json.parseJsonObj(this.getReturnData()).toString(), 
	        		 DiscourseResp.class);

	        } catch (Exception e) {
	            e.printStackTrace();
	        }
	        return data;
	    }
}